<?php
require_once 'Junction/Query/Update.php';

class Test_Junction_Query_Update extends PHPUnit_Framework_TestCase {
	
	public function testBuilder() {
		$query = new Junction_Query_Update();
		$query->bindTable('Users');
		$query->bindColumn('user_id', null);
		$query->bindColumn('email', 'foo@bar.com');
		$query->bindColumn('password', 'aPassword');
		
		$this->assertTrue($query->toSql() == 'UPDATE Users SET user_id = ?, email = ?, password = ?');
		$params = array(null, 'foo@bar.com', 'aPassword');
		$this->assertTrue($query->getParameters() == $params);
	}
}
?>